package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.project.util.EnumType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 库存商品
 */
@Data
@ApiModel(value = "用户实体")
@TableName("t_goods")
public class GoodsBean {
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_goodsId",type = IdType.AUTO)
    private String id;
    @ApiModelProperty(value = "商品名")
    @TableField("g_name")
    private String name;
    @ApiModelProperty(value = "商品图片")
    @TableField("g_img")
    private String img;
    @ApiModelProperty(value = "类别")
    @TableField("g_sort")
    private EnumType sort;//类别
    @ApiModelProperty(value = "品牌")
    @TableField("g_brand")
    private String brand;//品牌
    @ApiModelProperty(value = "库存量")
    @TableField("g_num")
    private Integer num;//库存量
    @ApiModelProperty(value = "最新采购价")
    @TableField("g_newPrice")
    private Integer newPrice;//最新采购价
    @ApiModelProperty(value = "建议零售价")
    @TableField("g_msrp")
    private Integer msrp;//建议零售价

    public GoodsBean() {
    }

    public GoodsBean(String name, String img, EnumType sort, String brand, Integer num, Integer newPrice, Integer msrp) {
        this.name = name;
        this.img = img;
        this.sort = sort;
        this.brand = brand;
        this.num = num;
        this.newPrice = newPrice;
        this.msrp = msrp;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getImg() {
        return img;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public EnumType getSort() {
        return sort;
    }

    public void setSort(EnumType sort) {
        this.sort = sort;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public Integer getNewPrice() {
        return newPrice;
    }

    public void setNewPrice(Integer newPrice) {
        this.newPrice = newPrice;
    }

    public Integer getMsrp() {
        return msrp;
    }

    public void setMsrp(Integer msrp) {
        this.msrp = msrp;
    }

    @Override
    public String toString() {
        return "GoodsBean{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", img='" + img + '\'' +
                ", sort=" + sort +
                ", brand='" + brand + '\'' +
                ", num='" + num + '\'' +
                ", newPrice=" + newPrice +
                ", msrp=" + msrp +
                '}';
    }
}
